package org.easybuy.serviceimpol;

import java.util.List;

import org.easybuy.dao.BaseDao;
import org.easybuy.dao.UserDao;
import org.easybuy.daoimpol.UserDaoimpol;
import org.easybuy.entity.User;
import org.easybuy.service.UserService;

/**
 * @author许高峰
 * @用户表业务实现类
 * 
 * */
public class UserServiceImpol extends BaseDao implements UserService {
	UserDao userDao = new UserDaoimpol();

	// 用户注册
	@Override
	public int insertUser(User user) {
		// TODO Auto-generated method stub
		return userDao.insertUser(user);
	}

	// 查询所有用户名
	@Override
	public List<User> getAllUserName() {
		// TODO Auto-generated method stub
		return userDao.getAllUserName();
	}

	// 查询所有邮箱
	@Override
	public List<User> getAllEmail() {
		// TODO Auto-generated method stub
		return userDao.getAllEmail();
	}

	// 查询所有手机号
	@Override
	public List<User> getAllMoblie() {
		// TODO Auto-generated method stub
		return userDao.getAllMoblie();
	}

	// 查询用户名
	@Override
	public User getAllLoginName(String loginName) {
		// TODO Auto-generated method stub
		return userDao.getAllLoginName(loginName);
	}

	// 查询指定用户名的密码
	@Override
	public User getUserPassword(String loginName,String password) {
		// TODO Auto-generated method stub
		return userDao.getUserPassword(loginName,password);
	}

}
